package com.example.zhunongzonghe.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.zhunongzonghe.dao.ZnFarmSpecificationMapper;
import com.example.zhunongzonghe.entity.ZnFarmSpecification;
import com.example.zhunongzonghe.service.ZnFarmSpecificationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author 蔡某人
* @description 针对表【zn_farm_specification】的数据库操作Service实现
* @createDate 2024-04-13 22:30:46
*/
@Service
public class ZnFarmSpecificationServiceImpl extends ServiceImpl<ZnFarmSpecificationMapper, ZnFarmSpecification>
    implements ZnFarmSpecificationService{

    @Resource
    private ZnFarmSpecificationMapper specificationMapper;

    @Override
    public ZnFarmSpecification SelectSpecId(Integer specId) {
        LambdaQueryWrapper<ZnFarmSpecification> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ZnFarmSpecification::getId,specId);
        ZnFarmSpecification specification = specificationMapper.selectOne(queryWrapper);
        if(specification==null) return null;
        return specification;
    }
}




